home *** CD-ROM | disk | FTP | other *** search
/ Mac Expert 1995 Winter / Mac Expert - Winter 95.iso / Les fichiers / Communications / Internet / ImageMap2AS ƒ / imagemap.example.CGI.script next >
Encoding:
Text File  |  1995-06-14  |  2.6 KB  |  74 lines  |  [TEXT/ToyS]

  1. -- THIS IS THE URL TO INCLUDE A CLICKABLE GIF MAP IN YOUR HTML FILES
  2. --<A HREF="greg/imagemap/gifmap.cgi"><IMG SRC="/greg/gifs/main.gif" ismap ALT = "gif map"></A>
  3. -- Replace the directories and files with the proper names.
  4.  
  5.  
  6.  
  7. on «event WWWΩsdoc» path_args given «class kfor»:http_search_args, «class post»:post_args, ¬
  8.   «class meth»:method, «class addr»:client_address, «class user»:username, «class pass»:password
  9.   set CRLF to (ASCII character 13) & (ASCII character 10)
  10.   set http_10_header to "HTTP/1.0 200 OK" & CRLF & "Server: MacHTTP" & CRLF & "MIME-Version: 1.0"¬
  11.   & CRLF & "Content-type: text/html" & CRLF & CRLF
  12.  
  13.   if http_search_args = "" then
  14.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/"
  15.  
  16.     Quit
  17.     return rhead & "index.html"
  18.   else
  19.     set comma to offset of "," in http_search_args
  20.     set theLast to count http_search_args
  21.     set x to (text 1 thru (comma - 1) of http_search_args) + 0
  22.     set y to (text (comma + 1) thru theLast of http_search_args) + 0
  23.   end if
  24.  
  25.  
  26. -- Created by WebMap 1.0.1
  27. -- Wednesday, February 8, 1995 at 7:35 PM
  28. -- Format: NCSA
  29.  
  30.  
  31.  
  32.  
  33.   if (x > 37 and x < 339) and (y > 44 and y < 84) then
  34.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/htmls/"
  35.     quit
  36.     return rhead & "crypto.html"
  37.  
  38.   else if (x > 37 and x < 339) and (y > 91 and y < 131) then
  39.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/htmls/"
  40.     quit
  41.     return rhead & "moo.html"
  42.  
  43.   else if (x > 37 and x < 338) and (y > 138 and y < 178) then
  44.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/htmls/"
  45.     quit
  46.     return rhead & "charles.html"
  47.  
  48.   else if (x > 37 and x < 337) and (y > 185 and y < 225) then
  49.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://www.utexas.edu/"
  50.     quit
  51.     return rhead & "charles.html"
  52.  
  53.   else if (x > 37 and x < 338) and (y > 232 and y < 272) then
  54.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/htmls/"
  55.     quit
  56.     return rhead & "programming.html"
  57.  
  58.   else if (x > 37 and x < 338) and (y > 278 and y < 317) then
  59.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/htmls/"
  60.     quit
  61.     return rhead & "hotlinks.html"
  62.  
  63.   else if (x > 37 and x < 339) and (y > 325 and y < 365) then
  64.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/forms/"
  65.     quit
  66.     return rhead & "comments.html"
  67.   else
  68.     set rhead to "HTTP/1.0 302 OK" & CRLF & "Location: http://uts.cc.utexas.edu/~grgcombs/"
  69.     quit
  70.     return rhead & "index.html"
  71.   end if
  72.  
  73. end «event WWWΩsdoc»
  74.